import { get, post } from '@/request/useRequest'
import { GridParams, ResponseBody } from '@/api/typing';

export async function list(params: GridParams): Promise<ResponseBody> {
  return get('poundsDataSource/list', params);
}

export async function upsert(params: object): Promise<ResponseBody> {
  return post('poundsDataSource/upsert',params);
}

export async function deletes(params: []): Promise<ResponseBody> {
  return post('poundsDataSource/deletes', params);
}

export async function testConnect(params: object): Promise<ResponseBody> {
  return post('poundsDataSource/test',params);
}





export async function listDetail(parentId: string): Promise<ResponseBody> {
  return get('poundsDataSourceDetail/list', { poundsDataSourceId: parentId });
}

export async function upsertDetail(params: object): Promise<ResponseBody> {
  return post('poundsDataSourceDetail/upsert',params);
}

export async function deletesDetail(params: []): Promise<ResponseBody> {
  return post('poundsDataSourceDetail/deletes', params);
}



